package com.its.common.net.core;

import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.Promise;

/**
 * @Author xiaxp
 * @Date 8/24/22 17:45
 * @Description
 */
public interface INetHandlerExecutor<T> {

    /** 同步执行
     * @param request
     * @return
     */
    T execute(Object... request);

    /** 交给线程池异步执行
     * @param promise
     * @param request
     * @return
     */
    Future<T> asyncExecute(Promise<T> promise, Object... request);
}
